$(function() {
	$("header").load("adds/head.html");
	$("#general-navigation").load("adds/general-navigation.html");
	$("footer").load("adds/footer.html");
	$("#destinos").load("adds/dest.html");

	$('.carousel').carousel({
  interval: 2000
})

$('.item').eq(Math.floor((Math.random() * $('.item').length))).addClass("active");

	$(window).scroll(function() {
		if ($(window).scrollTop() >= 200) {

			$(".nav-logo").fadeIn("10");
			$(".navbar .nav > li > a").css({"height":"50px", "line-height":"50px"});
			//$(".bs-docs-sidenav.affix").css({"top":"50px","position":"fixed"});
			
			

		} else {
			$(".nav-logo").fadeOut("10");
			$(".navbar .nav > li > a").css({"height":"auto","line-height":"30px"});
			//$(".bs-docs-sidenav.affix").css("position","relative");
		}
		
		if ($(window).scrollTop() >= 780) {

			
			//$("#destinav .affix").css({"top":"50px","position":"fixed"});
			
			

		} else {
			//$("#destinav .affix").css("position","relative");
		}
		//console.log($(window).scrollTop());
	});

	

});


